Skip to main content

All Questions

6votes
4answers
1kviews

Automate character search in C

THE TASK We are dealing with a string of symbols and need quick responses to queries of the following types: What is the position of the k-th occurrence of symbol X in the string? Reading from ...
Wow1345's user avatar
9votes
3answers
2kviews

Roast my C# birthday code

So this is a pretty simple code, I think it was? It asks for the user's birth day and month, and gives it back with the day a discount reminder email will be sent (the day before their birthday) Now ...
Epsilon's user avatar
6votes
2answers
373views

Random quote rotator

On my website, I created like this banner that rotates quotes from an array I made. ...
Black Jesus's user avatar
2votes
2answers
864views

Sorting a JavaScript array with a Regex

I'm using SharePoint 2013 JSOM. My variable this.templates contains a collection of templates with many different names. The only way to iterate through this ...
Treycos's user avatar
3votes
3answers
324views

Search for names in a hard-coded list of contacts

I am currently taking a class at my local community college for java programming as well as trying to learn as much as I can on my own time. I would like your opinion on a program I wrote that would ...
CakePuncher's user avatar
10votes
6answers
1kviews

Primitive String trimmer in C

I just picked up C and am following through The C programming language. I've previously got experience with a lot of 'higher'-level languages, so when I saw this exercise in the book: Write a ...
geostocker's user avatar
3votes
2answers
1kviews

Order line reversing (reversing line order)

I'm a student learning to code in C. I had to make a program for class to reverse lines of input from the keyboard (not character wise, but reverse the order of the lines input). The program is ...
Seb M's user avatar
4votes
3answers
14kviews

Checking to see if a string is alphabetic

...
user avatar
7votes
1answer
2kviews

Cipher text using a 2D array

I have a simple program which ciphers text using a 2D array. You specify what letters to replace with what and it does it. I understand the code is very repetitive and that I should probably use ...
Theodore Falcone's user avatar
0votes
1answer
187views

Function to find a substring within a string [closed]

I've just completed an exercise in which I had to create a program that searches for a string within another bigger string. If the substring exists then it is outputted to confirm and the starting ...
gloopit's user avatar
1vote
4answers
3kviews

Find the longest sequential same character array

I am a new guy to Java. I want to find the longest sequential same character array in a input character arrays. For example, this character array: bddfDDDffkl ...
tktktk0711's user avatar
5votes
1answer
2kviews

Finding common elements, ignoring duplicates, in two given string arrays

I am going through the CodingBat exercises for Java. Here is the one I have just completed: Start with two arrays of strings, a and ...
alanbuchanan's user avatar
5votes
2answers
1kviews

Text files: Copy, Rename, Append/Merge together

I wrote 3 subroutines related to batch data processing, they will be used together. A bit of background, I wrote this for my admin colleagues who do not write code. An application dumps daily ...
Phrancis's user avatar
21votes
4answers
18kviews

Reverse words in a given String

I'd like this code to be improved Input string: codereview is awesome Output string: awesome is codereview My approach: ...
Arun Prakash's user avatar
4votes
1answer
3kviews

Lingo game using Python

You guess a word, and if its letter(s) is in the same spot as a hidden word's, you add [] around the letter. If it's in the hidden word, but not in the same spot, you add()). As of now, I have a ...
Anonmly's user avatar

153050per page
close